import asyncio
import threading


def run_web_server():
    try:
        from common.web_server.webServer import app, run_web_server
        from llm.dashscope_stream import dashscope_stream_api
        import qwen_api

        app.include_router(qwen_api.api_http.router)

        run_web_server(port=8000)
    except Exception as e:
        print(e)

async def main():
    threading.Thread(target=run_web_server).start()

if __name__ == "__main__":
    asyncio.run(main())
